﻿using System;

using System.Collections.Generic;

namespace SBPweb.MediaCenter.Common.Extenders
{

    public class TagDictionary : Dictionary<object, object>
    {

        public TValue Get<TKey, TValue>(TKey key)
        {
            return Get<TKey, TValue>(key, default(TValue));
        }
        
        public TValue Get<TKey, TValue>(TKey key, TValue defaultValue)
        {
            TValue ret = defaultValue;

            if (this.ContainsKey(key))
            {
                return (TValue)this[key];
            }

            return ret;
        }

        public void Put<TKey, TValue>(TKey key, TValue value)
        {
            this[key] = value;
        }

    }

}